const tips = document.querySelector('.userNname>span');

user.onchange = () => {
    const user = document.querySelector('#user').value;
    ajax({
        url: './control/checkUser.php',
        method: 'GET',
        data: {
            value: user
        },
        sussces: res => {
            if (res === '0') {
                tips.innerHTML = '可以注册';
                tips.style.color = 'green';
            } else {
                tips.innerHTML = '用户名存在';
                tips.style.color = 'red';
            }
        }
    })
}